﻿Public Class MailServerSettings
    Private sFromEmail As String
    Public Property FromEmail() As String
        Get
            Return sFromEmail
        End Get
        Set(ByVal value As String)
            sFromEmail = value
        End Set
    End Property

    Private sFromName As String
    Public Property FromName() As String
        Get
            Return sFromName
        End Get
        Set(ByVal value As String)
            sFromName = value
        End Set
    End Property

    Private sSmtpHost As String
    Public Property SmtpHost() As String
        Get
            Return sSmtpHost
        End Get
        Set(ByVal value As String)
            sSmtpHost = value
        End Set
    End Property

    Private iSmtpPort As Integer
    Public Property SmtpPort() As Integer
        Get
            Return iSmtpPort
        End Get
        Set(ByVal value As Integer)
            iSmtpPort = value
        End Set
    End Property

    Private bSmtpAuthentication As Boolean
    Public Property SmtpAuthentication() As Boolean
        Get
            Return bSmtpAuthentication
        End Get
        Set(ByVal value As Boolean)
            bSmtpAuthentication = value
        End Set
    End Property

    Private sSmtpUsername As String
    Public Property SmtpUsername() As String
        Get
            Return sSmtpUsername
        End Get
        Set(ByVal value As String)
            sSmtpUsername = value
        End Set
    End Property

    Private sSmtpPassword As String
    Public Property SmtpPassword() As String
        Get
            Return sSmtpPassword
        End Get
        Set(ByVal value As String)
            sSmtpPassword = value
        End Set
    End Property

    Private sSmtpSsl As Boolean
    Public Property SmtpSsl() As Boolean
        Get
            Return sSmtpSsl
        End Get
        Set(ByVal value As Boolean)
            sSmtpSsl = value
        End Set
    End Property

    Public Shared Sub InitializeDefaultValuesMailServerSettings()
        If My.Settings.MailServerSettings Is Nothing Then
            My.Settings.MailServerSettings = New MailServerSettings
        End If

        My.Settings.MailServerSettings.FromEmail = "jobmatcherapp@gmail.com"
        My.Settings.MailServerSettings.FromName = "JobMatcher"
        My.Settings.MailServerSettings.SmtpHost = "smtp.gmail.com"
        My.Settings.MailServerSettings.SmtpPort = 587
        My.Settings.MailServerSettings.SmtpAuthentication = True
        My.Settings.MailServerSettings.SmtpUsername = "jobmatcherapp"
        My.Settings.MailServerSettings.SmtpPassword = "j0bm@tcher@pp"
        My.Settings.MailServerSettings.SmtpSsl = True
    End Sub
End Class
